﻿using MySpiderMgr.Data;
using MySpiderMgr.Domain.Resources;
using System;
using System.Collections.Generic;
using System.Text;

namespace MySpiderMgr.Services.Resources
{
    public class SysResourceService : ISysResourceService
    {
        readonly IRepository<SysResource> _SysResourceRep;

        readonly IUnitOfWork _UnitOfWork;

        public SysResourceService(IRepository<SysResource> sysResourceRep, IUnitOfWork unitOfWork)
        {
            this._SysResourceRep = sysResourceRep;
            this._UnitOfWork = unitOfWork;
        }
        public void SaveResource(SysResource sysResource)
        {
            _SysResourceRep.Add(new SysResource { });
            _UnitOfWork.Commit();
        }
    }
}
